<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
	function dosubmit() {
		if (document.all("name").value == "") {
			alert("用户名不能为空");
			document.all("name").focus();
			return false;
		}
		if (document.all("password").value == "") {
			alert("密码不能为空");
			document.all("password").focus();
			return false;
		}

		return true;
	}
</script>

<script type="text/javascript" src="/js/jquery-3.1.0.min.js"></script>

<script type="text/javascript">
	function foo() {
		console.log("callback")
	}
	function rater() {
		var tag = document.createElement("script");

		tag.src = 'http://localhost:10789/kaoyan_diagnostic/?callback=foo';

		document.getElementsByTagName("head")[0].appendChild(tag);
	}
</script>

</head>
<%
	//获取项目绝对路径 如： http://ip:port/projectName/
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<body>

	<input type="button" onclick=rater() value="提交" />
	<form action="http://localhost:10789/kaoyan_diagnostic/" method="GET">
		<div id="res"></div>
		Page encoding must be UTF8 <br> Use the 独立 option <br> Title<br>
		<input name="title" type="text" size="100"></input> <br> Content<br>
		<textarea name="article" rows="" cols=""
			style="height: 255px; width: 946px"></textarea>
		<br> <br> <select name="type">
			<option value="duli">独立</option>
			<option value="zonghe">综合</option>
		</select> <br> <br> <input type="submit" value="提交" />
	</form>
</body>
</html>